import { cloneDeep, lodashMap as map, template as lodashTemplate } from "lodash-es";
import { failres, okres } from "../config/resUtil.js";

import { Controller, App, Post, Body,Query,All } from "@midwayjs/core";
import { Application } from "../interface.js";
import { tb_dictdetailsController } from './generate/tb_dictdetails.controller.js'

// 一些默认的公共的操作
@Controller("/tb_dictdetails")
export class tb_dictdetailsControllerPlus  extends  tb_dictdetailsController  {


  @All("/apis")
  async apis(@Body() body,@Query() params) {
    var funname = body?._name||params?._name;

    var func = this?.[funname];
    if (!func) {
      return failres(funname + "404");
    }

    var _params = cloneDeep(body);
    delete _params._name;
    delete _params["模块"];

    var _func = func.bind(this);
    return _func(_params);
  }





  

}